Merged [15085] just in case
[adiumx.git] / Plugins / Gaim Service / ESGaduGaduService.m
blob5db94736d9ffa2fa7479ca6b0807c22e288c5e14
1 /* 
2  * Adium is the legal property of its developers, whose names are listed in the copyright file included
3  * with this source distribution.
4  * 
5  * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
6  * General Public License as published by the Free Software Foundation; either version 2 of the License,
7  * or (at your option) any later version.
8  * 
9  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
10  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
11  * Public License for more details.
12  * 
13  * You should have received a copy of the GNU General Public License along with this program; if not,
14  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15  */
17 #import "AIStatusController.h"
18 #import "DCGaimGaduGaduJoinChatViewController.h"
19 #import "ESGaduGaduService.h"
20 #import "ESGaimGaduGaduAccount.h"
21 #import "ESGaimGaduGaduAccountViewController.h"
23 @implementation ESGaduGaduService
25 //Account Creation
26 - (Class)accountClass{
27         return([ESGaimGaduGaduAccount class]);
30 - (AIAccountViewController *)accountViewController{
31     return([ESGaimGaduGaduAccountViewController accountViewController]);
34 - (DCJoinChatViewController *)joinChatView{
35         return([DCGaimGaduGaduJoinChatViewController joinChatView]);
38 //Service Description
39 - (NSString *)serviceCodeUniqueID{
40         return(@"libgaim-Gadu-Gadu");
42 - (NSString *)serviceID{
43         return(@"Gadu-Gadu");
45 - (NSString *)serviceClass{
46         return(@"Gadu-Gadu");
48 - (NSString *)shortDescription{
49         return(@"Gadu-Gadu");
51 - (NSString *)longDescription{
52         return(@"Gadu-Gadu");
54 - (NSCharacterSet *)allowedCharacters{
55         return([NSCharacterSet characterSetWithCharactersInString:@"+abcdefghijklmnopqrstuvwxyz0123456789@._ "]);
57 - (NSCharacterSet *)ignoredCharacters{
58         return([NSCharacterSet characterSetWithCharactersInString:@""]);
60 - (int)allowedLength{
61         return(24);
63 - (BOOL)caseSensitive{
64         return(NO);
66 - (AIServiceImportance)serviceImportance{
67         return(AIServiceSecondary);
70 - (void)registerStatuses{
71         [[adium statusController] registerStatus:STATUS_NAME_AVAILABLE
72                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AVAILABLE]
73                                                                           ofType:AIAvailableStatusType
74                                                                   forService:self];
75         
76         [[adium statusController] registerStatus:STATUS_NAME_AWAY
77                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AWAY]
78                                                                           ofType:AIAwayStatusType
79                                                                   forService:self];
80         
81         /*
82 #define AGG_STATUS_AVAIL              _("Available")
83 #define AGG_STATUS_AVAIL_FRIENDS      _("Available for friends only")
84 #define AGG_STATUS_BUSY               _("Away")
85 #define AGG_STATUS_BUSY_FRIENDS       _("Away for friends only")
86 #define AGG_STATUS_INVISIBLE          _("Invisible")
87 #define AGG_STATUS_INVISIBLE_FRIENDS  _("Invisible for friends only")
88 #define AGG_STATUS_NOT_AVAIL          _("Unavailable")
89         */
91         [[adium statusController] registerStatus:STATUS_NAME_AVAILABLE_FRIENDS_ONLY
92                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AVAILABLE_FRIENDS_ONLY]
93                                                                           ofType:AIAvailableStatusType
94                                                                   forService:self];
95         
96         [[adium statusController] registerStatus:STATUS_NAME_AWAY_FRIENDS_ONLY
97                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AWAY_FRIENDS_ONLY]
98                                                                           ofType:AIAwayStatusType
99                                                                   forService:self];
100         
101         [[adium statusController] registerStatus:STATUS_NAME_NOT_AVAILABLE
102                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_NOT_AVAILABLE]
103                                                                           ofType:AIAwayStatusType
104                                                                   forService:self];
105         
106         [[adium statusController] registerStatus:STATUS_NAME_INVISIBLE
107                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_INVISIBLE]
108                                                                           ofType:AIInvisibleStatusType
109                                                                   forService:self];
112 @end